<?php
require_once "../Common/database.php";

$query="UPDATE tblInventory SET Branch='$_POST[branch]', Department='$_POST[department]', Type='$_POST[type]', CheckedBy='$_POST[checkedby]', DateChecked='$_POST[date]', Reason='$_POST[reason]', Action='$_POST[action]', Faulty='$_POST[faulty]', Status='$_POST[status]' Where `key`='$_POST[key]' ";
mysql_query($query);
#echo $query ;
$result = mysql_query("SELECT * FROM tblInventory Where `key`='$_POST[key]'");
#echo $result;
while($row = mysql_fetch_array($result))
{
echo '<center><h1>Equipment Status Form </h1></center>';
echo '<h2 align=right> ID :  '.$_POST[key].'</h2>';
echo '<h2 align = left><br>Branch : '.$_POST[branch];
echo '<br><br>Department : '.$_POST[department];
echo '<br><br>Type of Equpment : '.$_POST[type];
echo '<br><br>Serial Number : '.$row[serial];
echo '<br><br>Checked by : '.$_POST[checkedby];
echo '<br><br>Date Checked : '.$_POST[date];
echo '<br><br><br>Reason : <br>'.$_POST[reason];
echo '<br><br><br>Action : <br>'.$_POST[action];
echo '<br><br>Faulty : '.$_POST[faulty];
echo '<br><br>Status : '.$_POST[status];
echo '</h2>';
echo '<p><a href="../index.php?m=i&p=iview">Back</a>';
echo '<center><font size=-5>Created by VHS</font>';

}

?>